/*!
 * (C) 2012 "DEVTEAM"
 * 
 * \file	reader.h
 * \author	Nguyen Tran Nhan
 * \date	15.06.2012
 * 
 */

#ifndef __READER_LIB_MAIN__
#define __READER_LIB_MAIN__

#include <stdlib.h>
#include <string.h>

/**
 * Main lib function to read data from comport, parser and insert to db
 * config file config
 *
 * return int
 */
typedef enum Status {		
	/* main lib is running */
	main_lib_running,
	
	/* main lib is stopped */
	main_lib_stopped,

	/* invalid status */
	invalid_status_main_lib
} main_lib_status_t;

/**
 * Main lib function to read data from comport, parser and insert to db
 * config file config
 *
 * return int
 */
int main_lib_start(const char *config);

/**
 * Main lib function to read data from comport, parser and insert to db
 * config file config
 *
 * return int
 */
int main_lib_stop();

/**
 * Main lib function to read data from comport, parser and insert to db
 * config file config
 *
 * return int
 */
main_lib_status_t get_main_lib_status();

#endif // __READER_LIB_MAIN__

